load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
load("@grpc_python_dependencies//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

py_proto_library(
    name = "reflection_py_pb2",
    deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor"],
)

py_grpc_library(
    name = "reflection_py_pb2_grpc",
    srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor"],
    strip_prefixes = ["src.python.grpcio_reflection."],
    deps = ["reflection_py_pb2"],
)

py_library(
    name = "grpc_reflection",
    srcs = glob(["*.py"]),
    imports = ["../../"],
    deps = [
        ":reflection_py_pb2",
        ":reflection_py_pb2_grpc",
        "//src/python/grpcio/grpc:grpcio",
        "@com_google_protobuf//:protobuf_python",
    ],
)
